home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / bin / DXUtils / AppWizard / DXAppwiz.awx / TEMPLATE / D3D_DLG.H < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-25  |  17.8 KB  |  525 lines

  1. //-----------------------------------------------------------------------------
  2. // File: $$root$$.h
  3. //
  4. // Desc: Header file $$root$$ sample app
  5. //-----------------------------------------------------------------------------
  6. #ifndef $$FILE_NAME_SYMBOL$$_INCLUDED_
  7. #define $$FILE_NAME_SYMBOL$$_INCLUDED_
  8.  
  9. #if _MSC_VER >= 1000
  10. #pragma once
  11. #endif
  12. #ifndef __AFXWIN_H__
  13. #error include 'stdafx.h' before including this file
  14. #endif
  15. $$IF(DPLAY)
  16.  
  17.  
  18.  
  19.  
  20. //-----------------------------------------------------------------------------
  21. // Player context locking defines
  22. //-----------------------------------------------------------------------------
  23. CRITICAL_SECTION g_csPlayerContext;
  24. #define PLAYER_LOCK()                   EnterCriticalSection( &g_csPlayerContext ); 
  25. #define PLAYER_ADDREF( pPlayerInfo )    if( pPlayerInfo ) pPlayerInfo->lRefCount++;
  26. #define PLAYER_RELEASE( pPlayerInfo )   if( pPlayerInfo ) { pPlayerInfo->lRefCount--; if( pPlayerInfo->lRefCount <= 0 ) SAFE_DELETE( pPlayerInfo ); } pPlayerInfo = NULL;
  27. #define PLAYER_UNLOCK()                 LeaveCriticalSection( &g_csPlayerContext );
  28.  
  29. CRITICAL_SECTION g_csWorldStateContext;
  30. #define WORLD_LOCK()                   EnterCriticalSection( &g_csWorldStateContext ); 
  31. #define WORLD_UNLOCK()                 LeaveCriticalSection( &g_csWorldStateContext );
  32. $$ENDIF
  33.  
  34.  
  35.  
  36.  
  37. //-----------------------------------------------------------------------------
  38. // Defines, and constants
  39. //-----------------------------------------------------------------------------
  40. // TODO: change "DirectX AppWizard Apps" to your name or the company name
  41. #define DXAPP_KEY        TEXT("Software\\DirectX AppWizard Apps\\$$root$$")
  42.  
  43. $$IF(ACTIONMAPPER|DPLAY)
  44. // This GUID must be unique for every game, and the same for 
  45. // every instance of this app.  // $$GUIDMSG$$
  46. $$IF(DPLAY)
  47. // The GUID allows DirectPlay to find other instances of the same game on
  48. // the network.  
  49. $$ENDIF // end DPLAY
  50. $$IF(ACTIONMAPPER)
  51. // The GUID allows DirectInput to remember input settings
  52. $$ENDIF // end ACTIONMAPPER
  53. GUID g_guidApp = $$GUIDSTRUCT$$;
  54.  
  55.  
  56. $$ENDIF // end (ACTIONMAPPER|DPLAY)
  57. $$IF(SHOW_TRIANGLE)
  58. // Custom D3D vertex format used by the vertex buffer
  59. struct CUSTOMVERTEX
  60. {
  61.     D3DXVECTOR3 position;       // vertex position
  62.     D3DXVECTOR3 normal;         // vertex normal
  63. };
  64.  
  65. #define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZ|D3DFVF_NORMAL)
  66.  
  67.  
  68. $$ENDIF // end SHOW_TRIANGLE
  69. $$IF(DPLAY)
  70. // Associate a structure with every network player
  71. struct APP_PLAYER_INFO
  72. {
  73.     // TODO: change as needed
  74.     LONG  lRefCount;                        // Ref count so we can cleanup when all threads 
  75.                                             // are done w/ this object
  76.     DPNID dpnidPlayer;                      // DPNID of player
  77.     TCHAR strPlayerName[MAX_PATH];          // Player name
  78.  
  79. $$IF(ACTIONMAPPER)
  80.     FLOAT fAxisRotateUD;                    // State of axis for this player
  81.     FLOAT fAxisRotateLR;                    // State of axis for this player
  82. $$ELSE
  83.     BOOL  bRotateUp;                       // State of up button or this player
  84.     BOOL  bRotateDown;                     // State of down button or this player
  85.     BOOL  bRotateLeft;                     // State of left button or this player
  86.     BOOL  bRotateRight;                    // State of right button or this player
  87. $$ENDIF
  88. $$IF(DPLAYVOICE)
  89.  
  90.     BOOL  bHalfDuplex;                      // TRUE if player is in half-duplex mode
  91.     BOOL  bTalking;                         // TRUE if player is talking
  92. $$ENDIF
  93.  
  94.     APP_PLAYER_INFO* pNext;
  95.     APP_PLAYER_INFO* pPrev;
  96. };
  97.  
  98.  
  99. $$ENDIF // end DPLAY
  100. $$IF(ACTIONMAPPER)
  101. // DirectInput action mapper reports events only when buttons/axis change
  102. // so we need to remember the present state of relevant axis/buttons for 
  103. // each DirectInput device.  The CInputDeviceManager will store a 
  104. // pointer for each device that points to this struct
  105. struct InputDeviceState
  106. {
  107.     // TODO: change as needed
  108.     FLOAT fAxisRotateLR;
  109.     BOOL  bButtonRotateLeft;
  110.     BOOL  bButtonRotateRight;
  111.  
  112.     FLOAT fAxisRotateUD;
  113.     BOOL  bButtonRotateUp;
  114.     BOOL  bButtonRotateDown;
  115. $$IF(DMUSIC || DSOUND)
  116.  
  117.     BOOL  bButtonPlaySoundButtonDown;
  118. $$ENDIF
  119. };
  120.  
  121.  
  122. $$ENDIF
  123. // Struct to store the current input state
  124. struct UserInput
  125. {
  126. $$IF(KEYBOARD)
  127.     BYTE diks[256];   // DirectInput keyboard state buffer 
  128.  
  129. $$ENDIF
  130.     // TODO: change as needed
  131. $$IF(ACTIONMAPPER)
  132.     FLOAT fAxisRotateUD;
  133.     FLOAT fAxisRotateLR;
  134. $$ELSE // start !ACTIONMAPPER --> (KEYBOARD || !DINPUT)
  135.     BOOL bRotateUp;
  136.     BOOL bRotateDown;
  137.     BOOL bRotateLeft;
  138.     BOOL bRotateRight;
  139. $$ENDIF 
  140. $$IF(DMUSIC || DSOUND)
  141.     BOOL bPlaySoundButtonDown;
  142. $$ENDIF
  143. $$IF(ACTIONMAPPER)
  144.     BOOL bDoConfigureInput;
  145.     BOOL bDoConfigureDisplay;
  146. $$ENDIF
  147. $$IF(DPLAYVOICE)
  148.     BOOL bDoConfigureVoice;
  149. $$ENDIF
  150. };
  151.  
  152.  
  153. $$IF(ACTIONMAPPER)
  154. // Input semantics used by this app
  155. enum INPUT_SEMANTICS
  156. {
  157.     // Gameplay semantics
  158.     // TODO: change as needed
  159.     INPUT_ROTATE_AXIS_LR=1, INPUT_ROTATE_AXIS_UD,       
  160.     INPUT_ROTATE_LEFT,      INPUT_ROTATE_RIGHT,    
  161.     INPUT_ROTATE_UP,        INPUT_ROTATE_DOWN,
  162.     INPUT_CONFIG_INPUT,     INPUT_CONFIG_DISPLAY,
  163. $$IF(DPLAYVOICE)
  164.     INPUT_CONFIG_VOICE,     
  165. $$ENDIF
  166. $$IF(DMUSIC || DSOUND)
  167.     INPUT_PLAY_SOUND,       
  168. $$ENDIF
  169. };
  170.  
  171. // Actions used by this app
  172. DIACTION g_rgGameAction[] =
  173. {
  174.     // TODO: change as needed.  Be sure to delete user map files 
  175.     // (C:\Program Files\DirectX\DirectInput\User Maps\*.ini)
  176.     // after changing this, otherwise settings won't reset and will be read 
  177.     // from the out of date ini files 
  178.  
  179.     // Device input (joystick, etc.) that is pre-defined by DInput, according
  180.     // to genre type. The genre for this app is space simulators.
  181.     { INPUT_ROTATE_AXIS_LR,  DIAXIS_3DCONTROL_LATERAL,      0, TEXT("Rotate left/right"), },
  182.     { INPUT_ROTATE_AXIS_UD,  DIAXIS_3DCONTROL_MOVE,         0, TEXT("Rotate up/down"), },
  183. $$IF(DMUSIC || DSOUND)
  184.     { INPUT_PLAY_SOUND,      DIBUTTON_3DCONTROL_SPECIAL,    0, TEXT("Play sound"), },
  185. $$ENDIF
  186.  
  187.     // Keyboard input mappings
  188.     { INPUT_ROTATE_LEFT,     DIKEYBOARD_LEFT,               0, TEXT("Rotate left"), },
  189.     { INPUT_ROTATE_RIGHT,    DIKEYBOARD_RIGHT,              0, TEXT("Rotate right"), },
  190.     { INPUT_ROTATE_UP,       DIKEYBOARD_UP,                 0, TEXT("Rotate up"), },
  191.     { INPUT_ROTATE_DOWN,     DIKEYBOARD_DOWN,               0, TEXT("Rotate down"), },
  192. $$IF(DMUSIC || DSOUND)
  193.     { INPUT_PLAY_SOUND,      DIKEYBOARD_F5,                 0, TEXT("Play sound"), },
  194. $$ENDIF
  195.     { INPUT_CONFIG_DISPLAY,  DIKEYBOARD_F2,                 DIA_APPFIXED, TEXT("Configure Display"), },    
  196.     { INPUT_CONFIG_INPUT,    DIKEYBOARD_F3,                 DIA_APPFIXED, TEXT("Configure Input"), },    
  197. $$IF(DPLAYVOICE)
  198.     { INPUT_CONFIG_VOICE,    DIKEYBOARD_F4,                 DIA_APPFIXED, TEXT("Configure Voice"), },    
  199. $$ENDIF
  200. };
  201.  
  202. #define NUMBER_OF_GAMEACTIONS    (sizeof(g_rgGameAction)/sizeof(DIACTION))
  203.  
  204.  
  205. $$ENDIF
  206. $$IF(DPLAY)
  207. //-----------------------------------------------------------------------------
  208. // App specific DirectPlay messages and structures 
  209. //-----------------------------------------------------------------------------
  210.  
  211. // TODO: change or add app specific DirectPlay messages and structures as needed
  212. #define GAME_MSGID_WORLDSTATE    1
  213. #define GAME_MSGID_INPUTSTATE    2
  214. #define GAME_MSGID_HOSTPAUSE     3
  215.  
  216. // Change compiler pack alignment to be BYTE aligned, and pop the current value
  217. #pragma pack( push, 1 )
  218.  
  219. struct GAMEMSG_GENERIC
  220. {
  221.     // One of GAME_MSGID_* IDs so the app knows which GAMEMSG_* struct
  222.     // to cast the msg pointer into.
  223.     WORD nType; 
  224. };
  225.  
  226. struct GAMEMSG_WORLDSTATE : public GAMEMSG_GENERIC
  227. {
  228.     FLOAT fWorldRotX;
  229.     FLOAT fWorldRotY;
  230. };
  231.  
  232. struct GAMEMSG_INPUTSTATE : public GAMEMSG_GENERIC
  233. {
  234. $$IF(ACTIONMAPPER)
  235.     FLOAT fAxisRotateUD;
  236.     FLOAT fAxisRotateLR;
  237. $$ELSE
  238.     BOOL  bRotateUp;   
  239.     BOOL  bRotateDown; 
  240.     BOOL  bRotateLeft; 
  241.     BOOL  bRotateRight;
  242. $$ENDIF
  243. };
  244.  
  245. struct GAMEMSG_HOSTPAUSE : public GAMEMSG_GENERIC
  246. {
  247.     BOOL bHostPause;
  248. };
  249.  
  250. // Pop the old pack alignment
  251. #pragma pack( pop )
  252.  
  253.  
  254. $$ENDIF
  255.  
  256.  
  257. //-----------------------------------------------------------------------------
  258. // Name: class CAppForm
  259. // Desc: CFormView-based class which allows the UI to be created with a form
  260. //       (dialog) resource. This class manages all the controls on the form.
  261. //-----------------------------------------------------------------------------
  262. class CAppForm : public CFormView, public CD3DApplication
  263. {
  264. public:
  265.     BOOL                    m_bLoadingApp;          // TRUE, if the app is loading
  266. $$IF(SHOW_TRIANGLE)
  267.     LPDIRECT3DVERTEXBUFFER8 m_pVB;                  // Vextex buffer 
  268. $$ENDIF
  269. $$IF(D3DFONT)
  270.     CD3DFont*               m_pFont;                // Font for drawing text
  271. $$ELSE
  272.     ID3DXFont*              m_pD3DXFont;            // D3DX font    
  273. $$ENDIF
  274. $$IF(SHOW_TEAPOT)
  275.     ID3DXMesh*              m_pD3DXMesh;            // D3DX mesh to store teapot
  276. $$ENDIF
  277.  
  278. $$IF(KEYBOARD)
  279.     LPDIRECTINPUT8          m_pDI;                  // DirectInput object
  280.     LPDIRECTINPUTDEVICE8    m_pKeyboard;            // DirectInput keyboard device
  281. $$ENDIF
  282. $$IF(ACTIONMAPPER)
  283.     CInputDeviceManager*    m_pInputDeviceManager;  // DirectInput device manager
  284.     DIACTIONFORMAT          m_diafGame;             // Action format for game play
  285.     LPDIRECT3DSURFACE8      m_pDIConfigSurface;     // Surface for config'ing DInput devices
  286. $$ENDIF
  287.     UserInput               m_UserInput;            // Struct for storing user input 
  288.  
  289. $$IF(DMUSIC || DSOUND)
  290.     FLOAT                   m_fSoundPlayRepeatCountdown; // Sound repeat timer
  291. $$IF(DMUSIC)
  292.     CMusicManager*          m_pMusicManager;        // DirectMusic manager class
  293.     CMusicSegment*          m_pBounceSound;         // Bounce sound
  294. $$ELSE // start !DMUSIC
  295.     CSoundManager*          m_pSoundManager;        // DirectSound manager class
  296.     CSound*                 m_pBounceSound;         // Bounce sound
  297. $$ENDIF // end DMUSIC
  298.  
  299. $$ENDIF // end (DMUSIC || DSOUND)
  300. $$IF(DPLAY)
  301.     IDirectPlay8Peer*       m_pDP;                  // DirectPlay peer object
  302.     CNetConnectWizard*      m_pNetConnectWizard;    // Connection wizard
  303.     IDirectPlay8LobbiedApplication* m_pLobbiedApp;  // DirectPlay lobbied app 
  304.     BOOL                    m_bWasLobbyLaunched;    // TRUE if lobby launched
  305.     DPNID                   m_dpnidLocalPlayer;     // DPNID of local player
  306.     LONG                    m_lNumberOfActivePlayers;        // Number of players currently in game
  307.     TCHAR                   m_strLocalPlayerName[MAX_PATH];  // Local player name
  308.     TCHAR                   m_strSessionName[MAX_PATH];      // Session name
  309.     TCHAR                   m_strPreferredProvider[MAX_PATH];// Provider string
  310.     APP_PLAYER_INFO         m_PlayInfoList;         // List of players
  311.     APP_PLAYER_INFO*        m_pLocalPlayerInfo;     // APP_PLAYER_INFO struct for local player
  312.     HRESULT                 m_hrNet;                // HRESULT of DirectPlay events
  313.     FLOAT                   m_fWorldSyncTimer;      // Timer for syncing world state between players
  314.     BOOL                    m_bHostPausing;         // Has the host paused the app?
  315.     UserInput               m_CombinedNetworkInput; // Combined input from all network players
  316.  
  317. $$ENDIF
  318. $$IF(DPLAYVOICE)
  319.     CNetVoice*              m_pNetVoice;            // DirectPlay voice helper class
  320.     DVCLIENTCONFIG          m_dvClientConfig;       // Voice client config
  321.     GUID                    m_guidDVSessionCT;      // GUID for chosen voice compression
  322.     BOOL                    m_bNetworkPlayersTalking; // TRUE if any of the network players are talking
  323.     BOOL                    m_bLocalPlayerTalking; // TRUE if the local player is talking
  324.  
  325. $$ENDIF
  326.     FLOAT                   m_fWorldRotX;           // World rotation state X-axis
  327.     FLOAT                   m_fWorldRotY;           // World rotation state Y-axis
  328.  
  329. private:
  330.     HWND    m_hwndRenderWindow;
  331.     HWND    m_hwndRenderFullScreen;
  332.     HWND    m_hWndTopLevelParent;
  333.  
  334.     HRESULT ConfirmDevice( D3DCAPS8*,DWORD,D3DFORMAT );
  335.     HRESULT OneTimeSceneInit();
  336.     HRESULT InitDeviceObjects();
  337.     HRESULT RestoreDeviceObjects();
  338.     HRESULT FrameMove();
  339.     HRESULT Render();
  340.     HRESULT InvalidateDeviceObjects();
  341.     HRESULT DeleteDeviceObjects();
  342.     HRESULT FinalCleanup();
  343.     virtual HRESULT AdjustWindowForChange();
  344. $$IF(DPLAY || ACTIONMAPPER)
  345.     VOID    Pause( BOOL bPause );
  346. $$ENDIF
  347.  
  348.     HRESULT RenderText();
  349.  
  350. $$IF(DINPUT)
  351.     HRESULT InitInput( HWND hWnd );
  352. $$ENDIF // end DINPUT
  353.     void    UpdateInput( UserInput* pUserInput );
  354. $$IF(DPLAY)
  355.     HRESULT CombineInputFromAllPlayers( UserInput* pCombinedUserInput );
  356. $$ENDIF // end DPLAY
  357. $$IF(DINPUT)
  358.     void    CleanupDirectInput();
  359. $$ENDIF // end DINPUT
  360.  
  361. $$IF(DMUSIC || DSOUND)
  362.     HRESULT InitAudio( HWND hWnd );
  363.  
  364. $$ENDIF
  365. $$IF(DPLAY)
  366.     HRESULT InitDirectPlay();
  367.     void    CleanupDirectPlay();
  368.     HRESULT ConnectViaDirectPlay();
  369.     HRESULT SendLocalInputIfChanged();
  370.     HRESULT SendWorldStateToAll();
  371.     HRESULT SendPauseMessageToAll( BOOL bPause );
  372.  
  373. $$ENDIF
  374. $$IF(DPLAYVOICE)
  375.     HRESULT InitDirectPlayVoice();
  376.     VOID    UpdateTalkingVariables();
  377.     HRESULT UserConfigVoice();
  378.  
  379. $$ENDIF
  380.     VOID    ReadSettings();
  381.     VOID    WriteSettings();
  382.  
  383.     VOID    UpdateUIForDeviceCapabilites();
  384.  
  385. protected:
  386.     DECLARE_DYNCREATE(CAppForm)
  387.  
  388.              CAppForm();
  389.     virtual  ~CAppForm();
  390.  
  391. public:
  392.     BOOL IsReady() { return m_bReady; }
  393.     TCHAR* PstrFrameStats() { return m_strFrameStats; }
  394.     VOID RenderScene() { Render3DEnvironment(); }
  395.     HRESULT CheckForLostFullscreen();
  396.  
  397.     //{{AFX_DATA(CAppForm)
  398.     enum { IDD = IDD_FORMVIEW };
  399.     //}}AFX_DATA
  400.  
  401.     //{{AFX_VIRTUAL(CAppForm)
  402.     virtual void OnInitialUpdate();
  403.     protected:
  404.     virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
  405.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  406.     //}}AFX_VIRTUAL
  407.  
  408. public:
  409.     //{{AFX_MSG(CAppForm)
  410.     afx_msg void OnToggleFullScreen();
  411.     afx_msg void OnChangeDevice();
  412.     //}}AFX_MSG
  413.     DECLARE_MESSAGE_MAP()
  414. $$IF(ACTIONMAPPER)
  415.  
  416.     HRESULT InputAddDeviceCB( CInputDeviceManager::DeviceInfo* pDeviceInfo, const DIDEVICEINSTANCE* pdidi );
  417.     static HRESULT CALLBACK StaticInputAddDeviceCB( CInputDeviceManager::DeviceInfo* pDeviceInfo, const DIDEVICEINSTANCE* pdidi, LPVOID pParam );   
  418.     BOOL    ConfigureInputDevicesCB( IUnknown* pUnknown );
  419.     static BOOL CALLBACK StaticConfigureInputDevicesCB( IUnknown* pUnknown, VOID* pUserData );
  420. $$ENDIF
  421. $$IF(DPLAY)
  422.  
  423.     static HRESULT WINAPI StaticDirectPlayMessageHandler( PVOID pvUserContext, DWORD dwMessageId, PVOID pMsgBuffer );
  424.     HRESULT DirectPlayMessageHandler( PVOID pvUserContext, DWORD dwMessageId, PVOID pMsgBuffer );
  425.     static HRESULT WINAPI StaticDirectPlayLobbyMessageHandler( PVOID pvUserContext, DWORD dwMessageId, PVOID pMsgBuffer );
  426.     HRESULT DirectPlayLobbyMessageHandler( PVOID pvUserContext, DWORD dwMessageId, PVOID pMsgBuffer );
  427. $$ENDIF
  428. $$IF(DPLAYVOICE)
  429.  
  430.     static HRESULT WINAPI StaticDirectPlayVoiceServerMessageHandler( PVOID pvUserContext, DWORD dwMessageId, PVOID pMsgBuffer );
  431.     HRESULT DirectPlayVoiceServerMessageHandler( PVOID pvUserContext, DWORD dwMessageId, PVOID pMsgBuffer );
  432.     static HRESULT WINAPI StaticDirectPlayVoiceClientMessageHandler( PVOID pvUserContext, DWORD dwMessageId, PVOID pMsgBuffer );
  433.     HRESULT DirectPlayVoiceClientMessageHandler( PVOID pvUserContext, DWORD dwMessageId, PVOID pMsgBuffer );
  434. $$ENDIF
  435. };
  436.  
  437.  
  438.  
  439.  
  440. //-----------------------------------------------------------------------------
  441. // Name: class CAppDoc
  442. // Desc: Overridden CDocument class needed for the CFormView
  443. //-----------------------------------------------------------------------------
  444. class CAppDoc : public CDocument
  445. {
  446. protected:
  447.     DECLARE_DYNCREATE(CAppDoc)
  448.  
  449. // Overrides
  450.     // ClassWizard generated virtual function overrides
  451.     //{{AFX_VIRTUAL(CAppDoc)
  452.     public:
  453.     //}}AFX_VIRTUAL
  454.  
  455. // Implementation
  456.     //{{AFX_MSG(CAppDoc)
  457.         // NOTE - the ClassWizard will add and remove member functions here.
  458.         //    DO NOT EDIT what you see in these blocks of generated code !
  459.     //}}AFX_MSG
  460.     DECLARE_MESSAGE_MAP()
  461. };
  462.  
  463.  
  464.  
  465.  
  466. //-----------------------------------------------------------------------------
  467. // Name: class CAppFrameWnd
  468. // Desc: CFrameWnd-based class needed to override the CFormView's window style
  469. //-----------------------------------------------------------------------------
  470. class CAppFrameWnd : public CFrameWnd
  471. {
  472. protected:
  473.     DECLARE_DYNCREATE(CAppFrameWnd)
  474. public:
  475.     // ClassWizard generated virtual function overrides
  476.     //{{AFX_VIRTUAL(CAppFrameWnd)
  477.     public:
  478.     virtual BOOL PreCreateWindow( CREATESTRUCT& cs );
  479.     virtual BOOL LoadFrame(UINT nIDResource, DWORD dwDefaultStyle = WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, CWnd* pParentWnd = NULL, CCreateContext* pContext = NULL);
  480.     //}}AFX_VIRTUAL
  481.  
  482. protected:
  483.     //{{AFX_MSG(CAppFrameWnd)
  484.     afx_msg void OnChangeDevice();
  485. $$IF(ACTIONMAPPER)
  486.     afx_msg void OnConfigInput();
  487. $$ENDIF
  488. $$IF(DPLAYVOICE)
  489.     afx_msg void OnConfigVoice();
  490. $$ENDIF
  491.     //}}AFX_MSG
  492.     DECLARE_MESSAGE_MAP()
  493. };
  494.  
  495.  
  496.  
  497.  
  498. //-----------------------------------------------------------------------------
  499. // Name: class CApp
  500. // Desc: Main MFC application class derived from CWinApp.
  501. //-----------------------------------------------------------------------------
  502. class CApp : public CWinApp
  503. {
  504. public:
  505.  
  506. // Overrides
  507.     // ClassWizard generated virtual function overrides
  508.     //{{AFX_VIRTUAL(CApp)
  509.     public:
  510.     virtual BOOL InitInstance();
  511.     virtual BOOL OnIdle( LONG );
  512.     //}}AFX_VIRTUAL
  513.  
  514. // Implementation
  515.     //{{AFX_MSG(CApp)
  516.     //}}AFX_MSG
  517.     DECLARE_MESSAGE_MAP()
  518. };
  519.  
  520.  
  521. #endif
  522.  
  523.  
  524.  
  525.